package com.yc.framework.bizClass;

import com.yc.framework.baseClass.R;
import com.yc.framework.utils.MailManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class SendMailController {
    @Autowired
    MailManager mailManager;

    @RequestMapping("/sendMail")
    public R sendMail(@RequestBody Map<String, String> m) {
        mailManager.sendSimpleMail(m.get("title"), m.get("emailMsg"), m.get("email"));
        return R.ok("send success");
    }
}
